#

| Chapter 11 The Awk Scripting Language |

## 11.2 Conceptual Overview

Awk is a pattern-matching program for processing files, especially when they are databases. The new version of awk, called nawk, provides additional capabilities and is now the standard in SVR4. Awk is still available under the same name (it is really just a link to the command oawk). In the next major release of System V, nawk will become the default. (The Free Software Foundation has a version of awk called gawk. All features in nawk are available in gawk.)

With original awk, you can:

- Think of a text file as made up of records and fields in a textual database.

- Use variables to change the database.

- Perform arithmetic and string operations.

- Use programming constructs such as loops and conditionals.

- Produce formatted reports.

With nawk, you can also:

- Define your own functions.

- Execute UNIX commands from a script.

- Process the result of UNIX commands.

- Process command-line arguments more gracefully.

- Work more easily with multiple input streams.

11.1 Command-line Syntax |  | 11.3 Patterns and Procedures